package com.qf.aop;

import org.springframework.aop.MethodBeforeAdvice;
import org.springframework.aop.ThrowsAdvice;

import java.lang.reflect.Method;

/**
 * @author bss
 * @version V1.0
 * @Project maven
 * @Package com.qf.aop
 * @Description:
 * @Date 2022/9/27 15:07
 */
public class MyThrowAdvice implements ThrowsAdvice {

//    public void afterThrowing(Method method,Object[] objs,Object target,Throwable ta) {
//        System.out.println("这是一个异常");
//        System.out.println(method);
//        System.out.println(objs);
//        System.out.println(target);
//        System.out.println(ta);
//    }
public void afterThrowing(Exception e) {
    e.printStackTrace();
    System.out.println("异常增强");
}
}
